package com.aaa.sas.controller;

import com.aaa.pojo.Pagesas;
import com.aaa.pojo.ResultBeansas;
import com.aaa.pojo.test_result;
import com.aaa.sas.service.AccountServiceresult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/accountresult")
@ResponseBody
public class AccountControllerresult {
    @Autowired
    AccountServiceresult accountServiceresult;
    @RequestMapping(value = "/findAllresult"/*, produces = {"application/json;charset=UTF-8"}*/)

    public ResultBeansas findAll(Pagesas pagesas, test_result test_result) {
        return accountServiceresult.findAll(pagesas,test_result);
    }
    @RequestMapping("/deleteresult")


    public  int delete(Integer id){



        return accountServiceresult.delete(id);

    }
    @RequestMapping("/deletesresult")


    public  int deletes(@RequestParam Integer[] id){
        return accountServiceresult.deletes(id);

    }
    @RequestMapping("/check")
    public ResultBeansas<test_result> check(test_result test_result){
        /*System.out.println(view);*/
        test_result result = accountServiceresult.check(test_result);
        ResultBeansas<test_result> resultSas = new ResultBeansas<>();
        resultSas.setCode(0);
        resultSas.setMsg("");
        resultSas.setCount(1L);
        resultSas.setData(result);
        return resultSas;
    }


}
